package com.gxa.controller;

import com.gxa.common.R;
import com.gxa.service.GoodsInfoService;
import io.swagger.annotations.*;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;

import java.util.Map;

@Controller
@Api(value = "商品信息查询",tags = "商品信息查询接口API")
public class GoodsInfoController {
    @Autowired(required = false)
    private GoodsInfoService goodsInfoService;

    R r = new R();

    @RequestMapping(value = "/queryGoodsInfo",method = RequestMethod.POST)
    @ApiOperation(value = "商品数据接口",notes = "商品数据",httpMethod = "POST", response = R.class)
    @ApiResponses({
            @ApiResponse(code=200,message="请求成功"),
            @ApiResponse(code=404,message="找不到页面"),
            @ApiResponse(code=500,message="后台服务错误")
    })
    @ResponseBody
    public R queryGoodsList(@RequestBody @ApiParam(name = "map",value = "用户名和密码",required = true) Map map){
        R r = goodsInfoService.queryGoodsList(map);
        return r;
    }

}
